<?php

class Admin extends CI_Controller {

    public function __construct()
    {
        parent::__construct();
		$this->is_logged_in();
	}

	function admin_panel()
	{
		$data['main_content'] = 'product/index';
		$this->load->view('includes/menu_temp', $data);
	}
	
	function is_logged_in()
	{
		$is_logged_in = $this->session->userdata('is_logged_in');

		if(!isset($is_logged_in) || $is_logged_in !== true)
		{
			//i need to edit this still, this should be in a thisloadview. not good to echo here
			echo 'You don\'t have permission to access this page. <a href="../login">Login</a>';	
			die();
		}
	}

}